﻿/*  
    Copyright (C) <2007-2013>  <Kay Diefenthal>

    ArgusTv.UI.MediaCenter is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    ArgusTv.UI.MediaCenter is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with ArgusTv.UI.MediaCenter.  If not, see <http://www.gnu.org/licenses/>.
*/

using System;
using System.Collections;
using ArgusTV.UI.MediaCenter.Models;
using Microsoft.MediaCenter.UI;

namespace ArgusTV.UI.MediaCenter.Views
{
    public class SingelChannelEpgView : ModelItem
    {
        #region Private Fields

        private IList _channelListings;
        private ListingItemOffer _listingItemOffer;
        private ListingItem _listingItem;
        private String _channelName;

        #endregion

        #region Properties

        public String ChannelName
        {
            get { return _channelName; }
            set { if (_channelName != value) { _channelName = value; FirePropertyChanged("ChannelName"); } }
        }

        public IList ChannelListings
        {
            get { return _channelListings; }
            set { if (_channelListings != value) { _channelListings = value; FirePropertyChanged("ChannelListings"); } }
        }

        public ListingItem ListingItem
        {
            get { return _listingItem; }
            set { if (_listingItem != value) { _listingItem = value;  OnListingItemChanged(_listingItem, EventArgs.Empty); FirePropertyChanged("ListingItem"); } }
        }
        
        public ListingItemOffer ListingItemOffer
        {
            get { return _listingItemOffer; }
            set { if (_listingItemOffer != value) { _listingItemOffer = value; FirePropertyChanged("ListingItemOffer"); } }
        }

        #endregion

        #region Public Events

        public event EventHandler ListingItemChanged;

        #endregion

        #region Protected Methods

        protected virtual void OnListingItemChanged(Object sender, EventArgs args)
        {
            if (ListingItemChanged != null)
                ListingItemChanged(sender, args);
        }

        #endregion
    }
}